<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<div th:replace="include/header::head"></div>

<div th:replace="include/teacher_navbar::navbar(${loginTeacher})"></div>

<div class="container">
	<h1>
		<img th:src="@{/static/img/exam-teacher.png}" /> 上机考试管理
	</h1>

	<form th:if="${application.exam != null}" class="exam-form form-inline" th:action="@{/teacher/manage/binding/search}"
		method="post">
		<h4>按学生查找已登录信息</h4>
		<input type="text" name="number" placeholder="学号" size="20" />
		<input type="text" name="name" placeholder="姓名" size="20" />
		<input type="text" name="studentClass" placeholder="班级" size="20" />
		<button type="submit" class="btn btn-primary"><i class="icon-search"></i> 查找</button>
	</form>

	<form th:if="${application.exam != null}" class="exam-form form-inline" th:action="@{/teacher/manage/binding/searchip}"
		method="post">
		<h4>按ip地址查找已登录信息</h4>
		<input type="text" name="ip" placeholder="ip地址" size="20" />
		<button type="submit" class="btn btn-primary"><i class="icon-search"></i> 查找</button>
	</form>

	<div th:if="${application.exam != null}" class="container-fluid">
		<div  class="row-fluid">
			<h4>查找结果</h4>
			<table class="table table-striped table-bordered">
				<thead>
				<tr>
					<th class="span3">学号</th>
					<th class="span2">姓名</th>
					<th class="span3">班级</th>
					<th class="span3">ip地址</th>
					<th>&nbsp;</th>
				</tr>
				</thead>
				<tbody>
				<tr th:each="student : ${studentList}">
					<td th:text="${student.number}"></td>
					<td th:text="${student.name}"></td>
					<td th:text="${student.studentClass}"></td>
					<td th:text="${student.ip}"></td>
					<td>
						<a class="btn" th:href="@{'/teacher/manage/binding/delete/' + ${student.bindId}}">
							<i class="icon-remove"></i> 解锁
						</a>
					</td>
				</tr>
				</tbody>
			</table>
		</div>
	</div>

	<div th:if="${application.exam == null}" class="container-fluid">
		<div class="row-fluid">
			<div  class="span12 exam-info">
				<h4><strong>没有考试正在进行~</strong></h4>
			</div>
		</div>
	</div>

</div>
<div th:replace="include/teacher_footer::footer"></div>

